const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token, // 快捷访问token
  name: state => state.user.userInfo.username, // 快捷访问用户名
  userId: state => state.user.userInfo.userId, // 快捷访问用户的id
  staffPhoto: state => state.user.userInfo.staffPhoto, // 快捷访问用户的头像
  companyId: state => state.user.userInfo.companyId, // 快捷访问当前公司的id
  routes: state => state.permission.routes, // 快捷访问所有的路由对象数组
  roles: state => state.user.userInfo.roles // 快捷访问当前用户拥有的所有角色
}
export default getters

// name(state) {
//   return state.user.userInfo.username
// }
